package srx.open.com.mode;

import java.io.Serializable;

import org.json.JSONException;
import org.json.JSONObject;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * "status":524," description":"请求过于频繁", "detail":"客户端请求发送短信验证过于频繁"
 *
 * @author hailongqiu 356752238@qq.com
 */
public class SmssErrorMsg {
    int status;
    String description;
    String detail;

    public SmssErrorMsg(Throwable t) throws JSONException {
        JSONObject josn = new JSONObject(t.getMessage().toString());
        description = (String) josn.get("description");
        detail = (String) josn.get("detail");
        status = (Integer) josn.get("status");
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

}
